package com.duoec.dw.lineage.service.analyser;

import com.alibaba.druid.sql.ast.SQLStatement;
import com.duoec.dw.lineage.dto.TableLineageDto;

import java.util.Set;

/**
 * @author xuwenzhen
 */
public interface HiveStatementAnalyser<T extends SQLStatement> {
    /**
     * 匹配具体的SQLStatement
     *
     * @return 匹配类型
     */
    Set<Class<? extends SQLStatement>> parseSqlStatements();

    /**
     * 分析
     *
     * @param statement SQLStatement
     * @return 当前操作的血缘关系
     */
    TableLineageDto analyse(T statement);
}
